.class public final Lcom/ninesky/browser/provider/downloads/a;
.super Ljava/lang/Object;

# interfaces
.implements Landroid/content/ServiceConnection;


# instance fields
.field final synthetic a:Lcom/ninesky/browser/provider/downloads/DownloadService;


# direct methods
.method public constructor <init>(Lcom/ninesky/browser/provider/downloads/DownloadService;)V
    .locals 0

    iput-object p1, p0, Lcom/ninesky/browser/provider/downloads/a;->a:Lcom/ninesky/browser/provider/downloads/DownloadService;

    invoke-direct {p0}, Ljava/lang/Object;-><init>()V

    return-void
.end method


# virtual methods
.method public final onServiceConnected(Landroid/content/ComponentName;Landroid/os/IBinder;)V
    .locals 3

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/a;->a:Lcom/ninesky/browser/provider/downloads/DownloadService;

    const/4 v1, 0x0

    invoke-static {v0, v1}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Lcom/ninesky/browser/provider/downloads/DownloadService;Z)V

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/a;->a:Lcom/ninesky/browser/provider/downloads/DownloadService;

    monitor-enter v0

    :try_start_0
    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/a;->a:Lcom/ninesky/browser/provider/downloads/DownloadService;

    invoke-static {p2}, Landroid/media/IMediaScannerService$Stub;->asInterface(Landroid/os/IBinder;)Landroid/media/IMediaScannerService;

    move-result-object v2

    invoke-static {v1, v2}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Lcom/ninesky/browser/provider/downloads/DownloadService;Landroid/media/IMediaScannerService;)V

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/a;->a:Lcom/ninesky/browser/provider/downloads/DownloadService;

    invoke-static {v1}, Lcom/ninesky/browser/provider/downloads/DownloadService;->b(Lcom/ninesky/browser/provider/downloads/DownloadService;)Landroid/media/IMediaScannerService;

    move-result-object v1

    if-eqz v1, :cond_0

    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/a;->a:Lcom/ninesky/browser/provider/downloads/DownloadService;

    invoke-static {v1}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Lcom/ninesky/browser/provider/downloads/DownloadService;)V

    :cond_0
    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method

.method public final onServiceDisconnected(Landroid/content/ComponentName;)V
    .locals 3

    iget-object v0, p0, Lcom/ninesky/browser/provider/downloads/a;->a:Lcom/ninesky/browser/provider/downloads/DownloadService;

    monitor-enter v0

    :try_start_0
    iget-object v1, p0, Lcom/ninesky/browser/provider/downloads/a;->a:Lcom/ninesky/browser/provider/downloads/DownloadService;

    const/4 v2, 0x0

    invoke-static {v1, v2}, Lcom/ninesky/browser/provider/downloads/DownloadService;->a(Lcom/ninesky/browser/provider/downloads/DownloadService;Landroid/media/IMediaScannerService;)V

    monitor-exit v0

    return-void

    :catchall_0
    move-exception v1

    monitor-exit v0
    :try_end_0
    .catchall {:try_start_0 .. :try_end_0} :catchall_0

    throw v1
.end method
